import java.util.Stack;

public class Test {
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(12);//入栈
        myStack.push(23);
        myStack.push(34);
        myStack.push(45);
        int x = myStack.pop();
        System.out.println(x);

        int k = myStack.peek();
        System.out.println(k);
        int y = myStack.pop();
        System.out.println(y);

        boolean flg = myStack.empty();
        System.out.println(flg);
    }


    public static void main1(String[] args) {
        Stack<Integer>stack = new Stack< >();
        stack.push(12);//入栈
        stack.push(23);
        stack.push(34);
        stack.push(45);
        int x = stack.pop();
        System.out.println(x);

        int k = stack.peek();
        System.out.println(k);
        int y = stack.pop();
        System.out.println(y);

        boolean flg = stack.empty();
        System.out.println(flg);
    }
}
